package com.etc.entity;

import sun.misc.Contended;

@Contended
public class Room {
    private static final long serialVersionUID = -44123827737562295L;
    /**
     * 房间id
     */
    private String roomId;

    /**
     * 用户
     */
    private User userId;

    /**
     * 房间名
     */
    private String roomName;

    /**
     * 关注人数
     */
    private Integer concernNum;

    /**
     * 类型
     */
    private Type typeId;

    /**
     * 房间封面
     */
    private String roomImg;

    /**
     * 房间状态 1:关 2:开 
     */
    private int roomState;

    public int getRoomState() {
        return roomState;
    }

    public void setRoomState(int roomState) {
        this.roomState = roomState;
    }

    public String getRoomId() {
        return roomId;
    }

    public void setRoomId(String roomId) {
        this.roomId = roomId;
    }

    public User getUserId() {
        return userId;
    }

    public void setUserId(User userId) {
        this.userId = userId;
    }

    public String getRoomName() {
        return roomName;
    }

    public void setRoomName(String roomName) {
        this.roomName = roomName;
    }

    public Integer getConcernNum() {
        return concernNum;
    }

    public void setConcernNum(Integer concernNum) {
        this.concernNum = concernNum;
    }

    public Type getTypeId() {
        return typeId;
    }

    public void setTypeId(Type typeId) {
        this.typeId = typeId;
    }

    public String getRoomImg() {
        return roomImg;
    }

    public void setRoomImg(String roomImg) {
        this.roomImg = roomImg;
    }

    public Room(String roomId, User userId, String roomName, Integer concernNum, Type typeId, String roomImg, int roomState) {
        this.roomId = roomId;
        this.userId = userId;
        this.roomName = roomName;
        this.concernNum = concernNum;
        this.typeId = typeId;
        this.roomImg = roomImg;
        this.roomState = roomState;
    }

    public Room() {
    }

    @Override
    public String toString() {
        return "Room{" +
                "roomId='" + roomId + '\'' +
                ", userId=" + userId +
                ", roomName='" + roomName + '\'' +
                ", concernNum=" + concernNum +
                ", typeId=" + typeId +
                ", roomImg='" + roomImg + '\'' +
                ", roomState=" + roomState +
                '}';
    }

    public Room(User userId, String roomName, Integer concernNum, Type typeId, String roomImg, int roomState) {
        this.userId = userId;
        this.roomName = roomName;
        this.concernNum = concernNum;
        this.typeId = typeId;
        this.roomImg = roomImg;
        this.roomState = roomState;
    }
}